﻿namespace SKeeper.Persistence.Repositories
{
    using System.Linq;
    using System.Collections.Generic;

    using SKeeper.Domain.Items;
    using SKeeper.Domain.Repositories;
    using SKeeper.Persistence.Facade;
    
    public class ItemRepository : GenericRepository<Item>, IItemRepository
    {
        public ItemRepository(DomainModelFacade context)
            : base(context)
        {
        }
        
        public IEnumerable<Item> GetForCompany(int companyId)
        {
            return this.GetAll().Where(x => x.CompanyId == companyId).ToList();
        }
    }
}
